package com.atguigu.exer5_2;

//（1）声明一个MyDate类型，有属性：年year(int类型)，月month(int类型)，日day(int类型)
public class MyDate {//日期
    private int year;//年
    private int month;//月
    private int day;//日

    //构造器，快捷键Alt  + Insert
    public MyDate() {
    }

    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
    //get/set

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public String getInfo(){
        return year +"年" + month +"月" + day + "日";
    }
}
